package com.erp4j.dynamicfield.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.erp4j.dynamicfield.entity.BusinessModule;
import com.erp4j.dynamicfield.mapper.BusinessModuleMapper;
import com.erp4j.dynamicfield.service.BusinessModuleService;
import org.springframework.stereotype.Service;

@Service
public class BusinessModuleServiceImpl extends ServiceImpl<BusinessModuleMapper, BusinessModule>
        implements BusinessModuleService {

    @Override
    public BusinessModule getByCode(String moduleCode) {
        QueryWrapper<BusinessModule> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("module_code", moduleCode);
        return baseMapper.selectOne(queryWrapper);
    }
}
